package io.github.talelin.latticy.model;

import io.github.talelin.latticy.dto.receving.ReceivingSkuDTO;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

/**
 * 入库收货记录详情表
 *
 * @author generator@wulongbo
 * @since 2022-06-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_receiving_record_items")
@NoArgsConstructor
public class ReceivingRecordItemsDO extends BaseModel {

    /**
     * 收货记录id
     */
    private Integer recordId;

    /**
     * 产品sku
     */
    private String sku;

    /**
     * 产品sku名称
     */
    private String skuName;


    /**
     * 标品数
     */
    private Integer specimen;

    /**
     * 破损数
     */
    private Integer damaged;

    public ReceivingRecordItemsDO(ReceivingSkuDTO dto, Integer recordId) {
        BeanUtils.copyProperties(dto, this);
        this.recordId = recordId;
    }

}
